From: Jonas Dreßler Date: Fri, 7 Feb 2020 09:21:21 +0000 (+0100) Subject: blur-effect: Only apply paint opacity to actor blur X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~777^2^2~95 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ca35ae4364a0dad092197cd8f6fe39578ce1a359;p=gnome-shell.git blur-effect: Only apply paint opacity to actor blur We don't want to apply the opacity of the actor when blurring the background. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/991 --- diff --git a/src/shell-blur-effect.c b/src/shell-blur-effect.c index 881592027..f7b391dad 100644 --- a/src/shell-blur-effect.c +++ b/src/shell-blur-effect.c @@ -578,19 +578,15 @@ paint_texture (ShellBlurEffect *self, static void apply_blur (ShellBlurEffect *self, ClutterPaintContext *paint_context, - FramebufferData *from) + FramebufferData *from, + uint8_t paint_opacity) { - ClutterActor *actor; BlurData *vblur; BlurData *hblur; - guint8 paint_opacity; vblur = &self->blur[VERTICAL]; hblur = &self->blur[HORIZONTAL]; - actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (self)); - paint_opacity = clutter_actor_get_paint_opacity (actor); - /* Copy the actor contents into the vblur framebuffer */ cogl_pipeline_set_color4ub (from->pipeline, paint_opacity, @@ -784,6 +780,7 @@ shell_blur_effect_paint (ClutterEffect *effect, ClutterEffectPaintFlags flags) { ShellBlurEffect *self = SHELL_BLUR_EFFECT (effect); + uint8_t paint_opacity; if (self->blur_radius > 0) { @@ -798,13 +795,15 @@ shell_blur_effect_paint (ClutterEffect *effect, switch (self->mode) { case SHELL_BLUR_MODE_ACTOR: + paint_opacity = clutter_actor_get_paint_opacity (self->actor); + paint_actor_offscreen (self, paint_context, flags); - apply_blur (self, paint_context, &self->actor_fb); + apply_blur (self, paint_context, &self->actor_fb, paint_opacity); break; case SHELL_BLUR_MODE_BACKGROUND: paint_background (self, paint_context); - apply_blur (self, paint_context, &self->background_fb); + apply_blur (self, paint_context, &self->background_fb, 255); break; } }